﻿<Window x:Class="CPPEI.Coolzon.Designer.Views.StaticDataSourceWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:CPPEI.Coolzon.Designer.Views"
        mc:Ignorable="d"
        xmlns:ui="clr-namespace:CPPEI.Coolzon.UI;assembly=CPPEI.Coolzon.UI"
        Title="静态数据源" Height="500" Width="456" WindowStartupLocation="CenterScreen" Closed="Window_Closed"
         Style="{DynamicResource WindowStyle}">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="名称" Grid.Column="0" Margin="3,5,3,3"/>
            <ui:NameTextbox x:Name="_name" Grid.Column="1"  Margin="3"/>
        </Grid>
        <StackPanel Style="{DynamicResource ButtonPanelBackground}" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center" Orientation="Horizontal">
            <Button Name="btnAdd" Style="{DynamicResource AddButtonStyle}" Margin="3" Click="btnAdd_Click"></Button>
            <Button Name="btnDelete" Style="{DynamicResource RemoveButtonStyle}" Margin="3" Click="btnDelete_Click"></Button>
        </StackPanel>
        <StackPanel Grid.Row="3" HorizontalAlignment="Left" VerticalAlignment="Center" Orientation="Horizontal">
            <Button Style="{DynamicResource  SubmitOrCancelButtonStyle}" Name="btnSave" Content="保 存" Margin="30,3,3,3" Click="btnSave_Click"></Button>
        </StackPanel>
        <DataGrid x:Name="_dataGrid" Grid.Row="2"  AutoGenerateColumns="False" CanUserAddRows="False" FontSize="16" SelectionMode="Single" >
            <DataGrid.Columns>
                <DataGridTextColumn Header="串ID" Width="Auto" Binding="{Binding SeriesID, Mode=TwoWay}"></DataGridTextColumn>
                <DataGridTextColumn Header="串名称" Width="Auto" Binding="{Binding SeriesName, Mode=TwoWay}"></DataGridTextColumn>
                <DataGridTextColumn Header="项ID" Width="Auto" Binding="{Binding ItemID, Mode=TwoWay}"></DataGridTextColumn>
                <DataGridTextColumn Header="项名称" Width="Auto" Binding="{Binding ItemName, Mode=TwoWay}"></DataGridTextColumn>
                <DataGridTextColumn Header="值" Width="Auto" Binding="{Binding Value, Mode=TwoWay}"></DataGridTextColumn>
            </DataGrid.Columns>
        </DataGrid>
    </Grid>
</Window>
